home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 17 / AMIGAplus Sonderheft 17 (1999)(ICP)(DE)[!].iso / Rexx / VectorFontPath.pprx < prev    next >
Text File  |  1997-05-06  |  4KB  |  126 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1996, 1997 Cloanto Italia srl */
  2.  
  3. /* $VER: VectorFontPath.pprx 1.0 */
  4.  
  5. /** ENG
  6.  This script selects the directory path used by macros working with
  7.  vector fonts, such as "Vector Text" and "Text Whirlpool".
  8.  
  9.  The selected path must contain vector font description files with names
  10.  ending with ".otag".
  11.  
  12.  By default, the Amiga uses vector fonts in the Compugraphic file format.
  13.  Non-Amiga Compugraphic fonts can be installed using the Intellifont
  14.  tool which is part of the operating system. Other types of fonts, such
  15.  as Adobe Type 1 fonts, can also be used, if the appropriate libraries
  16.  have been installed. Digita's Wordworth package, for example, includes
  17.  such fonts and libraries. The path for Wordworth fonts, which can be
  18.  selected with this script, is "Wordworth:WwFonts/UFST".
  19. */
  20.  
  21. /** DEU
  22.  Dieses Skript dient zur Auswahl des Verzeichnispfads für Makros,
  23.  zu deren Ausführung Vektorschriften erforderlich sind, z.B.
  24.  "VektorText" und "Text Whirlpool".
  25.  
  26.  Unter dem ausgewählten Pfad müssen Dateien gespeichert sein, deren
  27.  Namen die Endung ".otag" aufweist.
  28.  
  29.  Der Amiga verwendet standardmäßig Vektorschriften im sog. "Compugraphic"-Format.
  30.  Nicht im Amiga-Format vorliegende Compugraphic-Fonts lassen sich mit Hilfe
  31.  des Hilfsprogramms Intellifont installieren, welches Bestandteil der
  32.  Amiga-Systemsoftware ist. Vorausgesetzt, daß die entsprechenden Libraries
  33.  vorhanden sind, lassen sich auch andere Fontformate (z.B. Adobe Typ 1)
  34.  einsetzen. Diese Libraries (und dazugehörige Fonts) befinden sich z.B. im
  35.  Lieferumfang der Textverarbeitung Wordworth von Digita. Der mit diesem
  36.  Skript einzustellende Pfad zu den Wordworth-Fonts würde z.B. folgendermaßen
  37.  aussehen: "Wordworth:WwFonts/UFST".
  38. */
  39.  
  40. /** ITA
  41.  Questo script consente di selezionare il percorso per i font usato dalle
  42.  macro che operano su font vettoriali, come "Vector Text" e "Text Whirlpool".
  43.  
  44.  Il percorso selezionato deve contenere file di descrizione font vettoriali,
  45.  riconoscibili dal suffisso ".otag".
  46.  
  47.  Per impostazione predefinita, Amiga usa font vettoriali in formato
  48.  Compugraphic. Si possono installare font Compugraphic non Amiga utilizzando
  49.  lo strumento Intellifont che è parte del sistema operativo. Altri tipi di
  50.  font, come quelli Adobe Type 1, possono essere utilizzati, se sono state
  51.  installate le opportune librerie. Il pacchetto Wordworth della Digita, per
  52.  esempio, include tali font e librerie. Il percorso per i font di Wordworth,
  53.  che si può selezionare con questo script, è "Wordworth:WwFonts/UFST".
  54. */
  55.  
  56. IF ARG(1, EXISTS) THEN
  57.     PARSE ARG PPPORT
  58. ELSE
  59.     PPPORT = 'PPAINT'
  60.  
  61. IF ~SHOW('P', PPPORT) THEN DO
  62.     IF EXISTS('PPaint:PPaint') THEN DO
  63.         ADDRESS COMMAND 'Run >NIL: PPaint:PPaint'
  64.         DO 30 WHILE ~SHOW('P',PPPORT)
  65.              ADDRESS COMMAND 'Wait >NIL: 1 SEC'
  66.         END
  67.     END
  68.     ELSE DO
  69.         SAY "Personal Paint could not be loaded."
  70.         EXIT 10
  71.     END
  72. END
  73.  
  74. IF ~SHOW('P', PPPORT) THEN DO
  75.     SAY 'Personal Paint Rexx port could not be opened'
  76.     EXIT 10
  77. END
  78.  
  79. ADDRESS VALUE PPPORT
  80. OPTIONS RESULTS
  81. OPTIONS FAILAT 10000
  82.  
  83. Get 'LANG'
  84. IF RESULT = 1 THEN DO        /* Deutsch */
  85.     req_title         = 'Pfad für Vektorfonts auswählen'
  86.     txt_err_oldclient = 'Für dieses Skript_ist eine neuere Version_von Personal Paint erforderlich'
  87. END
  88. ELSE IF RESULT = 2 THEN DO    /* Italiano */
  89.     req_title         = 'Percorso font vettoriali'
  90.     txt_err_oldclient = 'Questa procedura richiede_una versione più recente_di Personal Paint'
  91. END
  92. ELSE DO                /* English */
  93.     req_title         = 'Select the vector font path'
  94.     txt_err_oldclient = 'This script requires a newer_version of Personal Paint'
  95. END
  96.  
  97. Version 'REXX'
  98. IF RESULT < 7 THEN DO
  99.     RequestNotify 'PROMPT "'txt_err_oldclient'"'
  100.     EXIT 10
  101. END
  102.  
  103. set_fname  = 'ENV:PP_VectorPath'
  104. list_fname = 'ENV:PP_VectorFonts'
  105.  
  106.  
  107. LockGUI
  108. IF OPEN('settingfile', set_fname, 'R') THEN DO
  109.     spath = READCH('settingfile', 65535)
  110.     CALL CLOSE('settingfile')
  111. END
  112. ELSE spath = 'FONTS:'
  113.  
  114. RequestPath '"'req_title'" "'spath'"'
  115. IF RC = 0 THEN DO
  116.     PARSE VALUE RESULT WITH '"' path '"'
  117.     IF OPEN('settingfile', set_fname, 'W') THEN DO
  118.         WRITECH('settingfile', path)
  119.         CALL CLOSE('settingfile')
  120.  
  121.         IF spath ~= path THEN
  122.             ADDRESS COMMAND 'Delete >NIL: "'list_fname'"'
  123.     END
  124. END
  125. UnlockGUI
  126.